Skip to content

Conversation

@franferrax
Copy link

@franferrax franferrax commented Nov 11, 2025

OPENJDK-4184: Include new FIPS patch in OpenJDK 25 portable build

Hi,

This pull request re-implements a reduced version of the previous releases' FIPS patch-set, adapted to OpenJDK 25 and relying on the JDK-8319332: Security properties files inclusion proposal (introduced in OpenJDK 24).

This patch-set is one of the three pieces of the OPENJDK-2108: Remove crypto-policies and FIPS automation related patches design. The remaining two pieces are the configuration files (to be included in the RPM package) and the nss-native-fips-key-import-export-adapter (to be built in the RPM package).

Changes summary

ae176fa: OPENJDK-2108: Internal __redhat_fips__ property

Introduce an include-directives-only __redhat_fips__ magic property that expands as either true or false depending on the System FIPS status, reported by the /proc/sys/crypto/fips_enabled kernel file.

This patch is intended to be temporary, while we explore other alternatives (both upstream and binary-compatible ideas for downstream).

81e2bc0: OPENJDK-2123: Algorithms lockdown

Introduce RedHatFIPSFilter, a lightweight Security Providers Filter that uses an allow-list approach to enable non-cryptographic utilities from the providers that also implement uncertified cryptographic primitives, which should be avoided in a FIPS setup. RedHatFIPSFilter is enabled through the __redhat_fips_filter__ boolean security property.

When the JDK-8315487: Security Providers Filter work is ready, this patch can be replaced by a jdk.security.providers.filter value, as planned under OPENJDK-2123.

This patch was created in an effort to reduce the pre-existing algorithms-lockdown patch, taking advantage of the lessons learned during the JDK-8315487 development. NOTE: the patch is based on the fact that all the OpenJDK 25 bundled providers use java.security.Provider::putService() instead of the legacy services registration API (hashtable methods).

Copy link

@fitzsim fitzsim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

Introduce an 'include'-directives-only __redhat_fips__ magic property
that expands as either true or false depending on the System FIPS
status, reported by the /proc/sys/crypto/fips_enabled kernel file.
Introduce RedHatFIPSFilter, a lightweight Security Providers Filter that
uses an allow-list approach to enable non-cryptographic utilities from
the providers that also implement uncertified cryptographic primitives,
which should be avoided in a FIPS setup. RedHatFIPSFilter is enabled
through the __redhat_fips_filter__ boolean security property.
Copy link

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with this version.

@gnu-andrew gnu-andrew merged commit df04441 into rh-openjdk:fips-25u Nov 25, 2025
@franferrax franferrax deleted the fips-25u branch November 25, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants